Inside Macintosh: QuickTime Components

Previous | Chapter Top | Chapter Contents | Next

Getting Default Settings for an Image or a Sequence

This section describes the functions that allow you to derive sensible default compression settings for an image or a sequence. The standard dialog component examines an image you provide and selects appropriate default settings based on the image's characteristics. The component stores those settings for you and uses them with other functions, including not only functions governing image or sequence compression, but also utility functions such as SCNewGWorld . If you choose to display a dialog box to the user, the component uses these settings as the default dialog box settings.

Any of these functions may be used with a single image or an image that is part of a sequence. You tell the standard dialog component whether the image is part of a sequence when you call the function.

If there is a custom color table associated with the image or the sequence, these functions retrieve and store it. You can use the color table settings request (described on The Color Table Settings Request Type ) to retrieve the custom color table and obtain as much color and depth information as possible from the image or sequence of images.

You can retrieve these settings using the SCGetInfo function, or modify them using the SCSetInfo function, which are described on SCGetInfo and SCSetInfo , respectively.

There are three functions available: SCDefaultPictHandleSettings works with pictures, SCDefaultPictFileSettings works with picture files, and SCDefaultPixMapSettings works with pixel maps.

SCDefaultPixMapSettings

The SCDefaultPixMapSettings function allows you to derive default compression settings for an image that is stored in a pixel map.

pascal ComponentResult SCDefaultPixMapSettings
                                         (ComponentInstance ci, PixMapHandle src,
                                          short motion);
ci
Identifies your application's connection to a standard image-compression dialog component. You obtain this identifier from the Component Manager's OpenDefaultComponent function.
src
Contains a handle to the pixel map to be analyzed.
motion
Specifies whether the image is part of a sequence. Set this parameter to true if the image is part of a sequence; set it to false if you are working with a single still image.

SCDefaultPictHandleSettings

The SCDefaultPictHandleSettings function allows you to derive default compression settings for a picture that is stored in a handle.

pascal ComponentResult SCDefaultPictHandleSettings
                                          (ComponentInstance ci,
                                         PicHandle srcPicture,
                                         short motion);
ci
Identifies your application's connection to a standard image-compression dialog component. You obtain this identifier from the Component Manager's OpenDefaultComponent function.
srcPicture
Contains a handle to the picture to be analyzed.
motion
Specifies whether the image is part of a sequence. Set this parameter to true if the image is part of a sequence; set it to false if you are working with a single still image.

SCDefaultPictFileSettings

The SCDefaultPictFileSettings function allows you to derive default compression settings for a picture that is stored in a file.

pascal ComponentResult SCDefaultPictFileSettings
                                         (ComponentInstance ci, short srcRef,
                                          short motion);
ci
Identifies your application's connection to a standard image-compression dialog component. You obtain this identifier from the Component Manager's OpenDefaultComponent function.
srcRef
Contains a reference to the file to be analyzed.
motion
Specifies whether the image is part of a sequence. Set this parameter to true if the image is part of a sequence; set it to false if you are working with a single still image.

RESULT CODES

File Manager errors


© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next